/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout'

const messageRouter = {
  path: '/message',
  component: Layout,
  name: 'message',
  redirect: '/message/family/list',
  meta: {
    roles: [1, 2],
    title: '消息推送',
    icon: 'message'
  },
  children: [
    {
      path: 'family',
      component: () => import('@/views/PublicNested/index.vue'),
      redirect: '/message/family/list',
      name: 'message-family',
      hidden: true,
      meta: { title: '家庭端', breadcrumb: false, },
      children: [
        {
          path: 'list',
          component: () => import('@/views/message-management/family/list.vue'),
          name: 'list',
          meta: { title: '消息推送列表', breadcrumb: false, activeMenu: '/message' }
        },
        {
          path: 'add',
          component: () => import('@/views/message-management/family/add/index.vue'),
          name: 'add',
          meta: { title: '新增推送', activeMenu: '/message' }
        },
        {
          path: 'details',
          component: () => import('@/views/message-management/family/details/index.vue'),
          name: 'details',
          meta: { title: '查看推送', activeMenu: '/message' }
        },
      ]
    },

    // {
    //   path: 'app',
    //   component: () => import('@/views/message-management/app/index.vue'), // Parent router-view
    //   meta: { title: 'APP端' },
    //   redirect: '/message/app/list',
    //   children: [
    //     {
    //       path: 'list',
    //       component: () => import('@/views/message-management/app/list.vue'),
    //       meta: { title: '列表' }
    //     },
    //     {
    //       path: 'add',
    //       component: () => import('@/views/message-management/app/add/index.vue'),
    //       meta: { title: '新增推送' }
    //     }
    //   ]
    // },
  ]
}

export default messageRouter
